Skip to main content

FormInstance Methods

An object defining methods for the FormInstance class.

GetRelatedDocumentObjects(objectIds, telemetryCollectorHolder)​

Retrieves a list of related document objects based on the provided object IDs.

Parameters:​

objectIds (required): List<long>
A list of object IDs for which related document objects are to be fetched.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<List<RelatedDocumentObject>>
Returns a list of related document objects associated with the provided object IDs.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


BatchCreateWithDocumentData(documentsData, telemetryCollectorHolder)​

Creates multiple form instances with the provided list of document data.

Parameters:​

documentsData (required): List<FormDocumentData>
A list of document data to be used for creating the form instances.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<FormBatchCreateWithDocumentDataResponse>
Returns a response containing the result of the batch form creation process, including details for each form created and any errors encountered during the creation.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


SetControlValue(key, value , telemetryCollectorHolder)​

Sets the value of a specific control in the form instance.

Parameters:​

key (required): string
The key that identifies the control whose value is to be set.

value (required): object
The value to set for the specified control.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


Save(telemetryCollectorHolder)​

Saves the form instance by calling the SaveForm method.

Parameters:​

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<FormSaveResponse>
The result of the save operation.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


UpdateStatus(documentId, status, telemetryCollectorHolder)​

Updates the status of a document based on the provided document ID and status.

Parameters:​

documentId (required): long
The ID of the document whose status will be updated.

status (required): int
The new status to be set for the document.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<bool>
Returns true if the status update was successful, otherwise false.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


MergeData(controlValues, telemetryCollectorHolder)​

Merges the provided control values into the form instance controls.

Parameters:​

controlValues (required): Dictionary<string, object>
A dictionary containing the control names as keys and their corresponding values to be merged into the form instance.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


Release(formStateId, telemetryCollectorHolder)​

Releases the specified form state by its ID.

Parameters:​

formStateId (required): string
The ID of the form state to be released.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<bool>
A boolean value indicating success or failure.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


Initialize(createForm, telemetryCollectorHolder)​

Initializes the form instance, optionally creating the form if specified.

Parameters:​

createForm (optional): bool
Indicates whether the form should be created during initialization. Default is true.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<bool>
A boolean value indicating success or failure.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


SetUniqueId(documentId, uniqueId, telemetryCollectorHolder)​

Sets a unique ID for the specified document.

Parameters:​

documentId (required): long
The ID of the document for which the unique ID will be set.

uniqueId (required): string
The unique identifier to be associated with the document.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<bool>
A boolean value indicating success or failure.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


SetFormInstanceIntialParameters(serviceAPI, telemetryCollectorHolder)​

Sets the initial parameters for the form instance by initializing the FormManagerAPI and ServiceAPI properties and loading the necessary initial parameters.

Parameters:​

serviceAPI (required): ServiceAPI
The ServiceAPI instance used to interact with form-related services. This initializes the FormManagerAPI and ServiceAPI properties.

telemetryCollectorHolder (required): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: void
Method does not return anything

This is a sync method. Method runs synchronously.


GetFileSelectorObjects(objectIds, telemetryCollectorHolder)​

Retrieves a list of file selector objects based on the provided object IDs.

Parameters:​

objectIds (required): List<long>
A list of object IDs for which file selector objects need to be retrieved.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<List<FileSelectorObject>>
Returns a list of file selector objects associated with the provided object IDs.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


CheckColumnsIsUnique(documentId, controlName, rows, telemetryCollectorHolder)​

Checks whether the specified columns are unique in the provided grid data.

Parameters:​

documentId (optional): long?
The ID of the document being checked. If not provided, it defaults to null.

controlName (required): string
The name of the control whose columns are being checked for uniqueness.

rows (required): List<GridDataRow>
A list of grid data rows to be checked for uniqueness in the specified control.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<CheckColumnsIsUniqueResponse>
Returns a response containing the result of the uniqueness check, including details about which columns are not unique.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


GetControlValue(documentId, controlName, telemetryCollectorHolder)​

Retrieves the value of a specific control in the form instance.

Parameters:​

documentId (required): long
The ID of the document associated with the form instance.

controlName (required): string
The name of the control whose value needs to be retrieved.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<FormGetControlValueResponse>
The response containing the control value.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


DeleteDocument(documentId, telemetryCollectorHolder)​

Deletes a document based on the provided document ID.

Parameters:​

documentId (required): long
The ID of the document to be deleted.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<bool>
Returns true if the document was successfully deleted, otherwise false.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


GetRelatedDocumentObjectsV2(objectRequestSecretKeys, telemetryCollectorHolder)​

Retrieves a list of related document objects based on the provided secret keys for object requests.

Parameters:​

objectRequestSecretKeys (required): List<string>
A list of secret keys for object requests to fetch related document objects.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<List<RelatedDocumentObject>>
Returns a list of related document objects associated with the provided secret keys.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


SaveAsDraft(starterInfo, telemetryCollectorHolder)​

Saves the form instance as a draft by calling the SaveAsDraftForm method.

Parameters:​

starterInfo (optional): FormStarterInfo
Provides additional information related to the form starter. If not provided, default behavior will be used.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<FormSaveAsDraftResponse>
The result of the save operation.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


CreateWithDocumentData(documentData, telemetryCollectorHolder)​

Creates a form instance with the provided document data.

Parameters:​

documentData (required): FormDocumentData
The document data to be used for creating the form instance.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<FormCreateWithDocumentDataResponse>
Returns a response containing the result of the form creation process, which includes details such as the form instance's ID and any errors encountered during the creation.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


InitializeWithoutView(telemetryCollectorHolder)​

Initializes the form instance without creating a view, performing necessary initializations.

Parameters:​

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<bool>
A boolean value indicating success or failure.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


Run(telemetryCollectorHolder)​

Executes the form instance by calling the RunForm method.

Parameters:​

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<FormRunResponse>
The response containing the result of the form execution.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​


GetFileSelectorObjectsV2(objectRequestSecretKeys, telemetryCollectorHolder)​

Retrieves a list of file selector objects based on the provided object request secret keys.

Parameters:​

objectRequestSecretKeys (required): List<string>
A list of object request secret keys for which file selector objects need to be retrieved.

telemetryCollectorHolder (optional): ITelemetryCollectorHolder
Holds telemetry collection data. This property is advanced and primarily for internal telemetry purposes.

Returns:​

Type: Task<List<FileSelectorObject>>
Returns a list of file selector objects associated with the provided object request secret keys.

This is a async method. Method should be waited. Be careful if call this method without waiting.

See Also​